home *** CD-ROM | disk | FTP | other *** search
- /*
- File: PCICommonPlugin.h
-
- Contains: This file contains all interface related structures and prototypes common for pci expert to
-
- Version: Technology: Copland
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __PCICOMMONPLUGIN__
- #define __PCICOMMONPLUGIN__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- #ifndef __NAMEREGISTRY__
- #include <NameRegistry.h>
- #endif
- #ifndef __ERRORS__
- #include <Errors.h>
- #endif
- #ifndef __DRIVERFAMILYMATCHING__
- #include <DriverFamilyMatching.h>
- #endif
- #ifndef __INTERRUPTS__
- #include <Interrupts.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- #if FOR_SYSTEM8_PREEMPTIVE
- /* typedefs for common plugins interface*/
- typedef void (*DefaultEnablerFuncPtr)(InterruptSetMember setIDMember, void *refCon);
- typedef InterruptSourceState (*DefaultDisablerFuncPtr)(InterruptSetMember setIDMember, void *refCon);
- typedef InterruptMemberNumber (*DefaultDispatcherFuncPtr)(InterruptSetMember setIDMember, void *info, UInt32 theIntCount);
- typedef OSStatus (*InitializeFuncPtr)(void);
- typedef OSStatus (*FinalizeFuncPtr)(void);
- struct PCIPluginHeader {
- UInt32 version;
- UInt32 reserved1;
- UInt32 reserved2;
- UInt32 reserved3;
- PluginLoadID thisPluginLoadID;
- };
- typedef struct PCIPluginHeader PCIPluginHeader;
-
- typedef PCIPluginHeader *PCIPluginHeaderPtr;
- /* pci bridge descriptor definition*/
- struct PCIBridgeDescriptor {
- PCIPluginHeader InterfaceHeader;
- DriverDescription * TheDomainDriverDescription;
- DefaultEnablerFuncPtr DefaultBridgeEnablerFunc;
- DefaultDisablerFuncPtr DefaultBridgeDisablerFunc;
- DefaultDispatcherFuncPtr DefaultBridgeDispatcherFunc;
- FinalizeFuncPtr FinalizeFunc;
- };
- typedef struct PCIBridgeDescriptor PCIBridgeDescriptor;
-
- typedef PCIBridgeDescriptor *PCIBridgeDescriptorPtr;
- /*
- pci bridge variables for bridges
- stolen from marconi InterruptsAssign.c written by Matt Nelson
- */
- struct DefaultBridgeVariables {
- UInt32 lastEntryIntCount;
- InterruptMemberNumber lastServicedMember;
- UInt32 totalMembersScanned;
- UInt32 totalMemberCount;
- UInt8 * memberEnableFlags;
- };
- typedef struct DefaultBridgeVariables DefaultBridgeVariables;
-
- typedef DefaultBridgeVariables *DefaultBridgeVariablesPtr;
- /* pci header interface version definition*/
-
- enum {
- kPCIPluginVersion1000 = 0x01000000 /* initial pci family interface release*/
- };
-
- /* pci error codes*/
-
- enum {
- kPCIerrorNoError = noErr,
- kPCIerrorNoDeviceFound = nrInvalidNodeErr,
- kPCIerrorNoDomainFound = resNotFound,
- kPCIerrorBadPointerFound = smBadsPtrErr,
- kPCIerrorBadValueFound = kernelReturnValueErr,
- kPCIerrorBadRegPropertyFound = nrNotFoundErr,
- kPCIerrorNoNotificationProduced = resNotFound,
- kPCIerrorMemoryAllocationFailed = nrNotEnoughMemoryErr,
- kPCIerrorUnsupportedPluginVersion = kernelUnsupportedErr,
- kPCIerrorFatal = kernelUnrecoverableErr
- };
-
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __PCICOMMONPLUGIN__ */
-
-